import db from "@src/dataBase/db";
import Sequelize from "sequelize";

const Region = db.define("region",
  {
    id: {type: Sequelize.STRING, primaryKey: true},
    name: {type: Sequelize.STRING},
    images: {type: Sequelize.JSON},
    videos: {type: Sequelize.JSON},
    visit_num: {type: Sequelize.INTEGER},
    category_id: {type: Sequelize.STRING},
    content: {type: Sequelize.TEXT},
    created_at: {type: Sequelize.BIGINT},
    updated_at: {type: Sequelize.BIGINT},
  },
  {
    // 禁止创建时间戳
    timestamps: false,
    // 以下划线命名字段
    underscored: true,
    // 表名
    tableName: "region",
  },
);

export default Region;